import request from '@/utils/request'

// 查询志愿者列表
export function listVolunter(query) {
  return request({
    url: '/sportVolunter/volunter/list',
    method: 'get',
    params: query
  })
}

// 查询志愿者详细
export function getVolunter(sportVolunteruuid) {
  return request({
    url: '/sportVolunter/volunter/' + sportVolunteruuid,
    method: 'get'
  })
}


//学生报名 信息自动填入
export function queryinsertVlunterxinx(user_name) {
  return request({
    url: '/sportVolunter/volunter/getvolunterinfomat/' + user_name,
    method: 'get'
  })
}


// 新增志愿者
export function addVolunter(data) {
  return request({
    url: '/sportVolunter/volunter',
    method: 'post',
    data: data
  })
}

// 修改志愿者
export function updateVolunter(data) {
  return request({
    url: '/sportVolunter/volunter',
    method: 'put',
    data: data
  })
}

// 删除志愿者
export function delVolunter(sportVolunteruuid) {
  return request({
    url: '/sportVolunter/volunter/' + sportVolunteruuid,
    method: 'delete'
  })
}
